package com.zdsoft.finance.project.service;

import com.zdsoft.finance.base.service.BaseService;
import com.zdsoft.finance.common.exception.BusinessException;
import com.zdsoft.finance.project.entity.Project;

import java.util.List;
import java.util.Map;

/** 项目service接口
 * @author LiaoGuoWei
 * @create 2016-11-14 15:20
 **/
public interface ProjectService extends BaseService<Project> {

    /**
     * 保存项目
     * @param project 项目域对象
     * @return
     * @throws BusinessException
     */
    public Project saveProject(Project project) throws BusinessException;

    /**
     * 更新项目
     * @param project 项目域对向
     * @return
     * @throws BusinessException
     */
    public Project updateProject(Project project) throws BusinessException;

    /**
     * 按照项目编号查找
     * @param projectCd 项目编号
     * @return
     * @throws BusinessException
     */
    public Project findByProjectCd(String projectCd) throws BusinessException;

    /**
     * 按照业务编号查找
     * @param busiCd 业务编号
     * @return
     * @throws BusinessException
     */
    public Project findByBusiCd(String busiCd) throws BusinessException;

    /**
     * 按照条件查找
     * @param conditions 查询条件
     * @return
     * @throws BusinessException
     */
    public List<Project> findByConditions(Map<String, Object> conditions) throws BusinessException;

    /**
     * 按照ID查找
     * @param id ID
     * @return
     * @throws BusinessException
     */
    public Project findById(String id) throws BusinessException;
}
